package com.ruibang.glass.quality.mapper;

import com.ruibang.glass.quality.domain.req.ArchiveDefectReq;
import com.ruibang.glass.quality.domain.req.DefectLossReq;
import com.ruibang.glass.quality.domain.req.ExternalDefectReq;
import com.ruibang.glass.quality.domain.req.InspectionDefectStatisticsReq;
import com.ruibang.glass.quality.domain.resp.*;
import com.ruibang.glass.quality.entity.*;
import com.teaming.cloud.framework2.autoconfigure.dynamic.datasource.annotation.DS;
import com.teaming.cloud.framework2.autoconfigure.mybatisplus.mapper.CommonMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;


@Mapper
public interface TotalEquDataMapper extends CommonMapper<TotalEquData> {

    @DS("hot2_bc2mes")
    List<ReceivePackage> queryTodayReceiveData(@Param("currentDay") String currentDay);

    List<EveryHourColdDirectLoss> queryEveryHourColdDirect(@Param("currentDay") String currentDay);

    EverydayColdDirectLoss queryEverydayHourColdDirect(@Param("currentDay") String currentDay);

    List<EverydayDefectLoss> queryColdEverydayDefectLose(@Param("lossReq") DefectLossReq defectLossReq);

    List<EveryHourDefectLoss> queryColdEveryHourDefectLose(@Param("lossReq") DefectLossReq defectLossReq);

    List<EveryHourDefectLoss> queryHotEveryHourDefectLose(@Param("lossReq") DefectLossReq defectLossReq);

    List<DiscardData> queryEverydayDiscard(@Param("selectSql") String sql);

    List<DiscardDefectData> queryDiscardDefectData(@Param("selectSql") String sql);

    List<BandDefectData> queryBandDefectData(@Param("selectSql") String selectSql);

    List<EveryHourArchiveDefect> queryEveryHourArchiveDefect(@Param("archiveDefectReq") ArchiveDefectReq archiveDefectReq);

    List<EverydayArchiveDefect> queryEverydayArchiveDefect(@Param("archiveDefectReq") ArchiveDefectReq archiveDefectReq);

    List<ExternalDefectOverlayMap> queryExternalDefectOverlayMap(@Param("externalDefectReq") ExternalDefectReq externalDefectReq);

    List<DefectDetailResp> queryDefectDetailData(@Param("sql") String selectSql);

    List<InspectionDefectStatisticsResp> queryInspectionDefectData(@Param("inspectionDefectStatisticsReq") InspectionDefectStatisticsReq inspectionDefectStatisticsReq);

    List<EverydayDefectLoss> queryHotEverydayDefectLose(@Param("lossReq") DefectLossReq defectLossReq);


}
